.class Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;
.super Ljava/lang/Object;
.source "GpsCorrectionsChooserDialog.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;->show(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;

.field final synthetic val$unit:Ljava/lang/String;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;Ljava/lang/String;)V
    .locals 0

    .line 92
    iput-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;->this$0:Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;->val$unit:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 4

    .line 95
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;->this$0:Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;

    iget-object p1, p1, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;->width_holder:Landroid/widget/EditText;

    invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    const-string v0, ","

    .line 97
    invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    const-string v2, ""

    const-string v3, "."

    if-eqz v1, :cond_0

    invoke-virtual {p1, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 98
    invoke-virtual {p1, v0, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    .line 101
    :cond_0
    invoke-virtual {p1, v0, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    const-wide/16 v0, 0x0

    .line 103
    invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_1

    .line 104
    invoke-static {p1}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v0

    .line 106
    :cond_1
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;->val$unit:Ljava/lang/String;

    invoke-static {v0, v1, p1}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracyBack(DLjava/lang/String;)D

    move-result-wide v0

    .line 107
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;->this$0:Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;

    invoke-virtual {p1}, Landroid/app/Dialog;->dismiss()V

    .line 108
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$3;->this$0:Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;

    iget-object p1, p1, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog;->setListener:Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$OnSetListener;

    if-eqz p1, :cond_2

    invoke-interface {p1, v0, v1}, Llt/noframe/gpsfarmguide/dialogs/GpsCorrectionsChooserDialog$OnSetListener;->onSet(D)V

    goto :goto_0

    :cond_2
    const-string p1, "Eq_Width_diag"

    const-string v0, " naviOptions is null, but dialog is showing"

    .line 110
    invoke-static {p1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    :goto_0
    return-void
.end method
